import {DataTypes} from "sequelize";
import {sequelize} from "../../../../config/mysqlDB.js";

const studentModel = sequelize.define('student', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
  },
  name: {
    type: DataTypes.STRING,
    allowNull: false,
  },
  age: {
    type: DataTypes.INTEGER,
    allowNull: false,
  },
  hobbyId: {
    type: DataTypes.INTEGER,
    allowNull: false,
  }
});

studentModel.sync({force: false}).then((res) => {
});

export default studentModel;


